<%--
 *  File:    BookSetInfo.jsp
 *  @Author: AndyYang
 *  Date:    Friday, January 03, 2003

 *  Copyright (C) 2000 - 2001 Oval Technologies, Inc.
 *  All rights reserved.
 *
 *  This software is the confidential and proprietary information of Oval
 *  Technologies, Inc. ("Confidential Information").  You shall not
 *  disclose such Confidential Information and shall use it only in
 *  accordance with the terms of the license agreement you entered into
 *  with Oval.
--%>


<%@ include file="/inc/SessionTimeout.inc"%>
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="org.apache.log4j.Category" %>
<%@ page import="com.oval.util.*" %>

<%@ page contentType = "text/html;charset=UTF-8" %>
<%@ taglib uri="/WEB-INF/PageFlow.tld" prefix="PageFlow" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/custom.tld" prefix="custom" %>

<%
  Category cat = Category.getInstance("jsp.BookSetInfo");
  String strModuleName = "SPM";
  String privilegeCode = "40104";
%>

<%@include file="/inc/PageDefault.inc"%>

<%@include file="/inc/Security.inc"%>

<html>
<head>
<title>booksetinfo</title>
<PageFlow:CheckPageFlow pageName="booksetinfo"/>
<script language="JavaScript" src="../../js/ScriptLib.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../css/<%= strLanguageCode %>/main.css" type="text/css">
</head>
<%
  HashMap bookset = (HashMap)pageContext.getAttribute("booksetinfo");
  if(bookset==null)
    bookset=new HashMap();

  String isChecked1 = "";
  String isChecked2 = "";
  String isChecked3 = "";
  String isChecked21 = "";
  String isChecked22 = "";
  String accperiodtype = "";
  Integer accperiodnum1 = null;
  Integer accperiodnum11 = null;
  Integer accperiodnum2 = null;
  Integer segmentdatenum = null;
  Integer perioddays = null;

  if(bookset.get("accperiodtype")!=null)
    accperiodtype=(String)bookset.get("accperiodtype");
  if(accperiodtype.equals("1"))
    isChecked1 = "checked";
  else if(accperiodtype.equals("2"))
  {
    isChecked2 = "checked";
    accperiodnum1= (Integer)bookset.get("accperiodnum");
    segmentdatenum=(Integer)bookset.get("segmentdatenum");
    perioddays=new Integer((365-segmentdatenum.intValue())/(accperiodnum1.intValue()-1));
    if(perioddays.intValue()==segmentdatenum.intValue())
    {
      isChecked21 = "checked";
      accperiodnum11=accperiodnum1;
    }else if(segmentdatenum.intValue() >= perioddays.intValue())
    {
      isChecked21 = "checked";
      accperiodnum11=new Integer(accperiodnum1.intValue()+1);
    }else
    {
      isChecked22 = "checked";
      accperiodnum11 = accperiodnum1;
      accperiodnum1 = new Integer(accperiodnum1.intValue()-1);
    }
  }
  else if(accperiodtype.equals("3"))
  {
    isChecked3 = "checked";
    accperiodnum2= (Integer)bookset.get("accperiodnum");
  }

%>
<body>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
     <tr>
       <td>
      <table width="100%" cellspacing="0" cellpadding="0">
        <tr>
          <td colspan="2" class="summary_top"></td>
        </tr>
	<tr>
          <td colspan="2"><img src="../../images/<%= strLanguageCode %>/quote.gif" width="16" height="11"><%= label.getLabelName("L_BookSet") + label.getLabelName("L_Colon")%></td>
        </tr>
      </table>
      <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
        <tr>
          <td class="td-text" width="110"><%= label.getLabelName("L_BooksetCode")%><%=  label.getLabelName("L_Colon")%></td>
          <td width="300"><custom:write property="booksetcode" name="booksetinfo" nbsp="true" /></td>
          <td class="td-text" width="110"><%= label.getLabelName("L_BooksetName")%><%=  label.getLabelName("L_Colon")%></td>
          <td><custom:write property="booksetname" name="booksetinfo" nbsp="true" /></td>
        </tr>
        <tr>
          <td class="td-text"><%= label.getLabelName("L_OwnerOrg1")%><%=  label.getLabelName("L_Colon")%></td>
          <td><custom:write property="ownerorgname" name="booksetinfo" nbsp="true" /></td>
          <td class="td-text"><%= label.getLabelName("L_BeginningDate")%><%=  label.getLabelName("L_Colon")%></td>
          <td><custom:write property="begindate" name="booksetinfo" nbsp="true" dataType="date" dataFormatName="dateformat" /></td>
        </tr>
        <tr>
          <td class="td-text"> <%= label.getLabelName("L_HomeCurrency")+ label.getLabelName("L_Colon")%></td>
          <td><custom:write property="currencyname" name="booksetinfo" nbsp="true" /></td>
          <td class="td-text"><%= label.getLabelName("L_BeginningMonth")%><%=  label.getLabelName("L_Colon")%></td>
          <td>
            <custom:write property="beginmonth" name="booksetinfo" nbsp="true" /><%=label.getLabelName("L_Month")%>
            <custom:write property="beginday" name="booksetinfo" nbsp="true" /><%=label.getLabelName("L_Day")%>
          </td>
        </tr>
        <tr>
          <td class="td-text"> <%= label.getLabelName("L_EndingMonth")%><%=  label.getLabelName("L_Colon")%></td>
          <td colspan="3">
            <custom:write property="endmonth" name="booksetinfo" nbsp="true" /><%=label.getLabelName("L_Month")%>
            <custom:write property="endday" name="booksetinfo" nbsp="true" /><%=label.getLabelName("L_Day")%>
          </td>
        </tr>
      </table>
        </td>
    </tr>
    <tr>
        <td class="summary_top"></td>
    </tr>
</table>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
    <tr>
        <td>
            <table width="100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td colspan="2" class="summary_top"></td>
                </tr>
                <tr>
                    <td colspan="2"><img src="../../images/<%= strLanguageCode %>/quote.gif" width="16" height="11"><%= label.getLabelName("L_SetAP")%><%=  label.getLabelName("L_Colon")%></td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding="1" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
                <tr>
                    <td class="td-text" rowspan="6"><%= label.getLabelName("L_Normal") + label.getLabelName("L_AccountPeriod") +label.getLabelName("L_Colon") %></td>
                    <td width="22">
            		<input type="radio" name="radiobutton" value="1" class="checkbox" disabled <%=JspHelper.filterNull(isChecked1)%>>
                    </td>
                    <td colspan="4"><%= label.getLabelName("L_Nature") + label.getLabelName("L_Month") %></td>
                </tr>
                <tr>
                    <td rowspan="3">
            		<input type="radio" name="radiobutton" value="2" class="checkbox" disabled <%=JspHelper.filterNull(isChecked2)%>>
                    </td>
                    <td colspan="4"><%= label.getLabelName("L_PBES")%></td>
                </tr>
                <tr>
                    <td width="108"><%= label.getLabelName("L_PeriodDays")%><%=  label.getLabelName("L_Colon")%></td>
                    <td width="80">
                        &nbsp;<%=JspHelper.filterNull(perioddays)%>
                    </td>
                    <td width="80"><%= label.getLabelName("L_AccPeriodNum")%><%=  label.getLabelName("L_Colon")%></td>
                    <td>
            		<input type="radio" name="radiobutton2" value="radiobutton" class="checkbox" checked disabled <%=JspHelper.filterNull(isChecked21)%> >
                        &nbsp;<%=JspHelper.filterNull(accperiodnum1)%>
                        <input type="radio" name="radiobutton2" value="radiobutton" class="checkbox" disabled <%=JspHelper.filterNull(isChecked22)%>>
                        &nbsp;<%=JspHelper.filterNull(accperiodnum11)%>
                    </td>
                </tr>
                <tr>
                    <td colspan="4"><%= label.getLabelName("L_LastAPDays")+label.getLabelName("L_LeftBracket")+label.getLabelName("L_Not")+label.getLabelName("L_LeapYear")+label.getLabelName("L_RightBracket")+label.getLabelName("L_Colon") %>
                    	<custom:write property="segmentdatenum" name="booksetinfo" nbsp="true" />
                    </td>
                </tr>
                <tr>
                    <td rowspan="2">
                        <input type="radio" name="radiobutton" value="3" class="checkbox" disabled <%=JspHelper.filterNull(isChecked3)%>>
                    </td>
                    <td colspan="4"><%= label.getLabelName("L_RandomPeriodNum")%></td>
                </tr>
                <tr>
                    <td><%= label.getLabelName("L_Accountant")+label.getLabelName("L_AccPeriodNum")+label.getLabelName("L_Colon") %></td>
                    <td colspan="3">
            		&nbsp;<%=JspHelper.filterNull(accperiodnum2)%>
                    </td>
                </tr>
                <tr>
                    <td class="td-text" width="110"><%= label.getLabelName("L_SpecialPeriodNum")%><%=  label.getLabelName("L_Colon")%></td>
          	    <td colspan="5">&nbsp;<custom:write property="specialaccperiodnum" name="booksetinfo" nbsp="true" /></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="summary_top"></td>
    </tr>
</table>
<table width="100%" cellspacing="0" border="0" cellpadding="0">
    <tr>
        <td>
            <table width="100%" cellspacing="0" cellpadding="0">
                <tr>
                    <td colspan="2" class="summary_top"></td>
                </tr>
                <tr>
                    <td colspan="2"><img src="../../images/<%= strLanguageCode %>/quote.gif" width="16" height="11"><%= label.getLabelName("L_AccounterAccInfo")%><%=  label.getLabelName("L_Colon")%></td>
                </tr>
            </table>
            <table width="100%" border="1" cellpadding="0" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellspacing="0" align="center">
                <tr>
                  <td class="td-text" width="110"><%= (new OvalLabel(strLanguageCode,"GL")).getLabelName("L_GLAccountList")+label.getLabelName("L_Colon")%></td>
          	      <td width="100"><custom:write property="glaccountlistcode" name="booksetinfo" nbsp="true" /></td>
          	      <td width="200"><custom:write property="gllistdescription" name="booksetinfo" nbsp="true" /></td>
                  <td width="110" class="td-text" ><%= (new OvalLabel(strLanguageCode,"GL")).getLabelName("L_GLAccountStructure") + label.getLabelName("L_Colon")%></td>
          	      <td>&nbsp;<custom:write name="booksetinfo" property="glaccountstructure" nbsp="true"/></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td class="summary_top"></td>
    </tr>
    <tr>
        <td class="td_center"><a onclick="self.location.href='../../common/Blank.jsp?<%= OvalTools.randomURL() %>';"><custom:button type="1" label="L_Back" imgsrc="back.gif" border="0" style="width:60"/></a></td>
    </tr>
    <tr>
        <td class="td_center">&nbsp;</td>
    </tr>
</table>
</body>
</html>


